<template>
	<div v-bind="{ id: 'test' }" ref="mybox">
		请看id,vue2.0,v-bind里面的属性是不会覆盖原有属性的
	</div>
</template>

<script setup lang="ts">
import { onMounted, ref } from 'vue'
const mybox = ref<HTMLElement | null>(null)
onMounted(() => {
	console.log(mybox.value?.id)
})
</script>
